Integral expressions are determined for the elastic displacement and stress fields due to stationary or moving dislocation loops in three dimensional, not necessarily isotropic, finite samples. A line integral representation is found for the stress field, thus satisfying the expectation that stresses should depend on the location of the dislocation loop, but not on the location of surfaces bounded by such loops that are devoid of physical significance. In the stationary case the line integral representation involves a ``vector potential'' that depends on the specific geometry of the sample, through its Green's function: a specific combination of derivatives of the elastic stress produced by the Green's function appropriate for the sample is divergenceless, so it is the curl of this ``vector potential''. This ``vector potential'' is explicitely determined for an isotropic half space and for a thin plate. Earlier specific results in these geometries are recovered as special cases. In the non stationary case a line integral representation can be obtained for the time derivative of the stress field. This, combined with the static result, assures a line integral representation for the time dependent stress field.